package com.jxx.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.Data;
import lombok.experimental.Accessors;

@JsonIgnoreProperties(ignoreUnknown=true) //表示JSON转化时忽略未知属性
@TableName("`order`") //order为关键字需要加符号，否则会包sql语法错误
@Data
@Accessors(chain=true)
public class Order extends BasePojo{
    @TableId(type = IdType.AUTO)
    private Integer orderId;        //订单编号

    private Integer userId;         //用户编号

    private Integer itemId;      //商品编号
    @TableField(exist=false)    //入库忽该字段
    private Item item;
    private Integer orderTotal;    //增加订单总价
    private Integer itemNum;
    private Integer addressId;      //地址编号
    private Integer orderStatus;    //订单状态 1：待付款 2：待发货 3待收货 4 待评价
    @TableField(exist=false)
    private Address address;
}
